#pragma once
#include "UIControl.h"
#include "UIScrollBar.h"
#include "ObjList.h"

struct ParaText
{
    CString szText;
	int nHeight;
};
class CUISysCtrl :
	public CUIControl
{
public:
	CUISysCtrl(void);
	~CUISysCtrl(void);

	BOOL Create(LPCSTR szRsDir, CRect rcBound, CUIControl *pParent);
	virtual void SetBound(CRect rcBound);
	virtual void Render(CDC *pDC);
	virtual void PerformAction(UIAction action);
	virtual BOOL OnMouseWheel(UINT nFlags, short zDelta, CPoint pt);
public:
	void SetColor(COLORREF crText, COLORREF crBackground);
	void AddSysText(CString szText);
protected:
	void SetVerScrollInfo();
public:
	CObjList<ParaText> m_listText;
	int m_nTotalTextHeight;
	COLORREF m_crText;
	COLORREF m_crBackground;
	int m_nScrollWidth;
	CFont m_font;
	CUIScrollBar m_sbVertical;
};
